/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.maistre.swarn;

import java.util.Random;

/**
 *
 * @author Louis Maistre
 */
public class DNA {
	
	//TODO passer en generique pour tout type d'adn (ici char)
    
    char [] tableauLettres = {'a','c'};
    char [] tableauCaracteres = {'@','-','#','_','!'};
    
    String value ="";

    public DNA() {
    	this.value = "ac";
    }

    public DNA(String baseValue) {   
     this.value = baseValue;
    }
   
	public String addAllLetterRandom() {
		Random random = new Random();
		int index = random.nextInt(tableauLettres.length);
		return this.value.concat(Character.toString(tableauLettres[index]));
	}
	
	public char getRandom(){
		Random random = new Random();
		int index = random.nextInt(value.length());
		return value.charAt(index);
	}
    
	 @Override
	    public String toString() {
	        return "Dna::"+value.toString();
	    }

}
